package com.cn.boot.jpa.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Timestamp;

@Entity
@Data
//生成链式调用方法
@Builder
//自动生成无参构造函数
@NoArgsConstructor
//自动生成有参构造函数
@AllArgsConstructor
@Table(name = "role", schema = "spring")
public class RoleEntity {
    @Id
    private Integer id;
    private String name;
    private String code;
    private String introduce;
    private String status;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Timestamp createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Timestamp updateTime;
}
